Skip to content

Conversation

@isaacbmiller
Copy link
Collaborator

@isaacbmiller isaacbmiller commented Sep 26, 2025

Adds a json extraction function, which will allow us to properly parse brackets that jsonAdapter outputs:

Before, we would use a regex string that naively matches curly braces, but now we have a smarter extractor that takes the first full object.

We always pass this object to json_repair after.

{
  "reasoning": "think step by step",
  "issue_list": [
    {
      "issue_type": "some type",
      "severity_level": "fatal",
      "problem_code_snippet": "if (user) {"
    }
  ]
}

Would break before because of the unclosed bracket inside the code snippet.

This will also allow us to remove the regex dependency in a follow on PR.

Fixes #8759

@isaacbmiller isaacbmiller force-pushed the isaac/json-regex-parse7 branch from 10d11ce to 9ad247e Compare November 4, 2025 19:37
@isaacbmiller isaacbmiller marked this pull request as ready for review November 4, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] JSONAdapter's parse method regex pattern bug

2 participants